//============================================================================
// Copyright (C) 2008-2013 Brett R. Jones 
//
// Issued to public domain 2013
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================
#include "VxNetLib.h"
#include <VxUtilLib/VxSktUtil.h>
#include "VxSktBase.h"
#include <string.h>

//! return a string describing the socket error
//! most return strings are straight from operating system definitions
//! but also returns error strings of errors defined in VxSktLib
const char * VxSktBase::DescribeSktError( RCODE rcSktError )
{
	const char * pUtilLibErr = ::DescribeSktErr( (int )rcSktError );
	if( strcmp( pUtilLibErr, "Unknown socket error" ) )
	{
		// VxUtilLib knew what it was
		return pUtilLibErr;
	}
	// must be a error from our VxSktLib
	//TODO make error strings
	/*
	switch( rcSktError )
	{
	case 
	default:
		"Unknown socket error";
	}
	*/
	return "Unknown socket error";
}
